package com.pacvue.context;

import com.pacvue.entity.OperateLog;

public class OperateLogContext {

    private static final ThreadLocal<OperateLog> OPERATE_LOG_THREAD_LOCAL = new InheritableThreadLocal<>();

    public static void setOperateLog(OperateLog operateLog) {
        OPERATE_LOG_THREAD_LOCAL.set(operateLog);
    }

    public static OperateLog getOperateLog() {
        return OPERATE_LOG_THREAD_LOCAL.get();
    }

    public static void clear() {
        OPERATE_LOG_THREAD_LOCAL.remove();
    }

}
